﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Collection.Entities
{
	/// <summary>
	/// 复合属性结构
	/// </summary>
	public class ComplexProperty
	{
		/// <summary>
		/// 原始属性（数字串）
		/// </summary>
		private string key;

		/// <summary>
		/// 原始属性（数字串）
		/// </summary>
		public string Key
		{
			get { return key; }
		}

		/// <summary>
		/// 原始数据值（数字串）
		/// </summary>
		private string value;

		/// <summary>
		/// 原始属性（数字串）
		/// </summary>
		public string Value
		{
			get { return this.value; }
		}

		/// <summary>
		/// 所属类别
		/// </summary>
		private Catalog category;

		/// <summary>
		/// 所属类别
		/// </summary>
		public Catalog Category
		{
			get { return category; }
		}

		/// <summary>
		/// 属性解析的结果
		/// </summary>
		private PropertyValue result;

		/// <summary>
		/// 解析结果
		/// </summary>
		public PropertyValue Result
		{
			get { return result; }
		}

		/// <summary>
		///综合属性构造函数
		/// </summary>
		/// <param name="catalogId">分类Id</param>
		/// <param name="category">所属分类对象</param>
		/// <param name="key">属性名称的数字字符串表达</param>
		/// <param name="value">属性值的数字字符串表达</param>
		/// <param name="result">解析的结果</param>
		public ComplexProperty(string key, string value, Catalog category, PropertyValue result)
		{
			this.category = category;
			this.key = key;
			this.value = value;
			this.result = result;
		}
	}
}
